package fpt.graph;

import java.util.HashMap;
import java.util.List;

/**
 * SearchTreeNode
 * 
 * r41
 * 
 * 19 March 2010
 * 
 * This class is to represent a node in the bounded search tree
 * pahse of the FPT Algortihm. It takes an input of type
 * GraphFPTs or inputs of GraphFPT and two SearchTreeNodes.
 * @author Daniel De Guzman
 * 
 */
public class SearchTreeNode {
	private int k;
	private String name;
	private List<String> vertexCover;
	private HashMap<String, String[]> graph;
	private HashMap<String, String> removed;
	private SearchTreeNode firstChild;
	private SearchTreeNode secondChild;
	
	/**
	 * Constructor for a search tree node without any children
	 * @param graphInfo - Kernelized Graph information
	 */
	public SearchTreeNode(String name, GraphFPT graphInfo){
		this.name = name;
		this.k = graphInfo.getK();
		this.vertexCover = graphInfo.getVertexCover();
		this.graph = graphInfo.getGraph();
		this.removed = graphInfo.getRemoved();
		this.firstChild = null;
		this.secondChild = null;
	}
	
	// Getters and setters

	public int getK() {
		return k;
	}

	public void setK(int k) {
		this.k = k;
	}

	public List<String> getVertexCover() {
		return vertexCover;
	}

	public void setVertexCover(List<String> vertexCover) {
		this.vertexCover = vertexCover;
	}

	public HashMap<String, String[]> getGraph() {
		return graph;
	}

	public void setGraph(HashMap<String, String[]> graph) {
		this.graph = graph;
	}

	public HashMap<String, String> getRemoved() {
		return removed;
	}

	public void setRemoved(HashMap<String, String> removed) {
		this.removed = removed;
	}

	public SearchTreeNode getFirstChild() {
		return firstChild;
	}

	public void setFirstChild(SearchTreeNode firstChild) {
		this.firstChild = firstChild;
	}

	public SearchTreeNode getSecondChild() {
		return secondChild;
	}

	public void setSecondChild(SearchTreeNode secondChild) {
		this.secondChild = secondChild;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	
}
